package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TdBusinessMapper;
import com.ruoyi.system.domain.TdBusiness;
import com.ruoyi.system.service.ITdBusinessService;

/**
 * 经营业务Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-17
 */
@Service
public class TdBusinessServiceImpl implements ITdBusinessService 
{
    @Autowired
    private TdBusinessMapper tdBusinessMapper;

    /**
     * 查询经营业务
     * 
     * @param id 经营业务主键
     * @return 经营业务
     */
    @Override
    public TdBusiness selectTdBusinessById(String id)
    {
        return tdBusinessMapper.selectTdBusinessById(id);
    }

    /**
     * 查询经营业务列表
     * 
     * @param tdBusiness 经营业务
     * @return 经营业务
     */
    @Override
    public List<TdBusiness> selectTdBusinessList(TdBusiness tdBusiness)
    {
        return tdBusinessMapper.selectTdBusinessList(tdBusiness);
    }

    /**
     * 新增经营业务
     * 
     * @param tdBusiness 经营业务
     * @return 结果
     */
    @Override
    public int insertTdBusiness(TdBusiness tdBusiness)
    {
        tdBusiness.setCreateTime(DateUtils.getNowDate());
        return tdBusinessMapper.insertTdBusiness(tdBusiness);
    }

    /**
     * 修改经营业务
     * 
     * @param tdBusiness 经营业务
     * @return 结果
     */
    @Override
    public int updateTdBusiness(TdBusiness tdBusiness)
    {
        tdBusiness.setUpdateTime(DateUtils.getNowDate());
        return tdBusinessMapper.updateTdBusiness(tdBusiness);
    }

    /**
     * 批量删除经营业务
     * 
     * @param ids 需要删除的经营业务主键
     * @return 结果
     */
    @Override
    public int deleteTdBusinessByIds(String[] ids)
    {
        return tdBusinessMapper.deleteTdBusinessByIds(ids);
    }

    /**
     * 删除经营业务信息
     * 
     * @param id 经营业务主键
     * @return 结果
     */
    @Override
    public int deleteTdBusinessById(String id)
    {
        return tdBusinessMapper.deleteTdBusinessById(id);
    }
}
